DateTime? lastPopTime;

bool clickable() {
  if (lastPopTime == null ||
      DateTime.now().difference(lastPopTime!) > const Duration(seconds: 1)) {
    print(lastPopTime);
    lastPopTime = DateTime.now();
    return true;
  } else {
    // lastPopTime = DateTime
    //     .now(); //如果不注释这行,则强制用户一定要间隔2s后才能成功点击. 而不是以上一次点击成功的时间开始计算.
    print("请勿重复点击！");
    return false;
  }
}
